package com.biotecan.genome.cytobandviewer.data;

/**
 *
 * @author SuFeng
 * the muation object
 */
public class Mutation {

    private Integer chromosome;
    private long start;
    private long end;
    private double value = 0.0D;
    //the default mutation type
    private MutationType type = MutationType.UNKNOWN;

    public Mutation(String chromosome, String start, String end) {
        this.chromosome = Chromosome.convertChromosomeNameToIndex(chromosome);
        this.start = Long.parseLong(start);
        this.end = Long.parseLong(end);
    }

    public Mutation(String chromosome, String start, String end, MutationType mutationType) {
        this.chromosome = Chromosome.convertChromosomeNameToIndex(chromosome);
        this.start = Long.parseLong(start);
        this.end = Long.parseLong(end);

        this.type = mutationType;
    }

    public Mutation(String chromosome, String start, String end, String mutationType) {
        this.chromosome = Chromosome.convertChromosomeNameToIndex(chromosome);
        this.start = Long.parseLong(start);
        this.end = Long.parseLong(end);

        this.type = MutationType.valueOf(mutationType);
    }

    public Mutation(String chromosome, String start, String end, String mutationType, double value) {
        this.chromosome = Chromosome.convertChromosomeNameToIndex(chromosome);
        this.start = Long.parseLong(start);
        this.end = Long.parseLong(end);
        this.value = value;
        this.type = MutationType.valueOf(mutationType);
    }

    public Mutation() {
    }


    public int getChromosome() {
        return this.chromosome;
    }

    public void setChromosome(int chromosome) {
        this.chromosome = chromosome;
    }

    public long getStart() {
        return this.start;
    }

    public void setStart(long start) {
        this.start = start;
    }

    public long getEnd() {
        return this.end;
    }

    public void setEnd(long end) {
        this.end = end;
    }



    public MutationType getType() {
        return type;
    }

    public void setType(MutationType type) {
        this.type = type;
    }

    
    
    
    public double getValue() {
        return this.value;
    }

    public void setValue(double value) {
        this.value = value;
    }
}
